DragEnter
TheDragEnter
method should begin tracking a drag operation.
ODDragResult DragEnter (in ODDragItemIterator dragInfo, in ODFacet facet, in ODPoint where);
dragInfo
- A reference to a drag-item iterator that describes the content, as well as the types and values, of the dragged data.
facet
- A reference to a facet where the drag point is located.
where
- The location of the drag point, expressed in frame coordinates.
- return value
kODTrue
if this part accepts drag-and-drop events in its display frame, otherwisekODFalse
.DISCUSSION
OpenDoc calls this method when the drag point has entered the specified facet of this part during a drag operation. Before calling this method, OpenDoc calls theIsDroppable
method of the facet's frame to ensure that this part is able to receive a drop.Your part's
DragEnter
method should examine the part kinds of the dragged data (using the drag-item iterator specified by thedragInfo
parameter), and determine whether it can accept the dragged data. Your part should not at this point attempt to read data from any of the storage units supplied by the drag-item iterator. If your part can accept a drop, it should provide the appropriate feedback to the user, such as displaying its drag border or changing the cursor appearance. If your part cannot handle the part kinds of the dragged data, it should take no action. If your part'sDragEnter
method returnskODFalse
, OpenDoc assumes your part cannot accept a drop. OpenDoc will not make additional calls to yourDragWithin
orDrop
methods as long as the mouse pointer remains in this facet. In addition, if your part calls one of its display frames'SetDroppable
method with a value ofkODTrue
, you must override this method and implement the protocol for drag highlighting and accepting dropped data.OVERRIDING
When you subclassODPart
, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrDoesNotDrop
- This part does not support drag and drop.
SEE ALSO
TheODDragResult
type (page 922).
TheODPoint
type (page 885).
TheODFrame::SetDroppable
method (page 333).
TheODPart::DragLeave
method (page 502).
TheODPart::DragWithin
method (page 503).
TheODPart::Drop
method (page 506).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"On Entering a Part's Facet" on page 362 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help